// 封装所有与账号相关的接口函数
import http from '@/utils/http.js'

// 登录接口
export const getLoginAPI = (data) => {
    return http({
      url: "/admin/admin/login",
      method: "post",
      data,
    });
  };
// 查询管理员列表
export const getAccountListAPI = (params) => {
  return http({
    url: "/admin/admin/list",
    method: "get",
    params,
  });
};
// 添加管理员接口
export const addAdminAPI = (data) => {
  return http({
    url: "/admin/admin/add",
    method: "post",
    data,
  });
};
// 修改管理员信息接口
export const updateAdminAPI = (data) => {
  return http({
    url: "/admin/admin/update",
    method: "post",
    data,
  });
};
// 删除管理员接口
export const deleteAdminAPI = (data) => {
  return http({
    url: "/admin/admin/delete",
    method: "post",
    data,
  });
};